﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Expect.VisualStudio.Extensions;
using Microsoft.VisualStudio.Language.Intellisense;
using Expect.VisualStudio.Extensions.Commands;

namespace Expect.Vs2010.Extensions.Tagging
{
    class FixtureSmartTagAction : ISmartTagAction
    {
        private Action<SelectionResolution> _callback;

        private SelectionResolution _resolution;

        private string _name;

        private ICommand _command;

        public FixtureSmartTagAction(ICommand cmd, SelectionResolution resolution)
        {
            _command = cmd;
            _resolution = resolution;
        }

        public System.Collections.ObjectModel.ReadOnlyCollection<SmartTagActionSet> ActionSets
        {
            get { return null; }
        }

        public string DisplayText
        {
            get { return _command.DisplayText; }
        }

        public System.Windows.Media.ImageSource Icon
        {
            get { return null; }
        }

        public void Invoke()
        {
            if (_command != null)
            {
                _command.ExecuteCommand(_resolution);
            }
        }

        public bool IsEnabled
        {
            get { return true; }
        }
    }
}
